package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.factory.RemoteModelFallbackFactory;
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import com.ruoyi.system.api.model.LoginUser;
import com.ruoyi.system.api.model.ModelRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@FeignClient(name = "remoteModelService", url = "${remote.model.service-url}", fallbackFactory = RemoteModelFallbackFactory.class)
public interface RemoteModelService
{
    /**
     * 调用实体要素抽取接口，获取结果
     *
     * @param request 请求输入
     * @param source 请求来源
     * @return 结果
     */

    @PostMapping(value = "/getNERResult")
    public R<List<Map<String,Object>>> getNERResult(@RequestBody ModelRequest request, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 调用关系要素抽取接口，获取结果
     *
     * @param request 请求输入
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping(value = "/getREResult")
    public R<List<Map<String,Object>>> getREResult(@RequestBody ModelRequest request,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 调用事件要素抽取接口，获取结果
     *
     * @param request 请求输入
     * @param source 请求来源
     * @return 结果
     */
    @PostMapping(value = "/getEEResult")
    public R<List<Map<String,Object>>> getEEResult(@RequestBody ModelRequest request,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
